<%@ include file="/WEB-INF/jsp/includes/include.jsp" %>

<!-- BEGIN CONTENT HOLDER -->
<div id="contentHolder">

	<c:if test="${organisations != null}">
		<c:forEach items="${organisations}" var="organisation">

			<c:url scope="page" value="/organisation/profile.html" var="organisationProfileURL">
				<c:param name="id" value="${organisation.id}"/>
			</c:url>
			<c:url scope="page" value="/organisation/addorganisation.html" var="addOrganisationURL">
				<c:param name="id" value="${organisation.id}"/>
			</c:url>
			<c:url scope="page" value="/organisation/removeorganisation.html" var="removeOrganisationURL">
				<c:param name="id" value="${organisation.id}"/>
			</c:url>
			<c:url scope="page" value="/messageboard/postmessage.html" var="postMessageURL">
				<c:param name="id" value="${organisation.id}"/>
			</c:url>
			<c:url scope="page" value="/getImage.do" var="organisationImg">
				<c:param name="imgsrc" value="${organisation.imgSrc}"/>
			</c:url>


			<!-- BEGIN FIRST ORGANISATION -->
			<div class="organisationDetails">

				<div class="${organisationProfileURL}">
					<a href="${organisationProfileURL}">
						<img src="${organisationImg}" alt="${organisation.name}" width="70" class="profilePhoto" />
					</a>
				</div><!-- .organisationImage -->

				<div class="organisationExtendedInfo">

					<div class="organisationName">
						<a href="${organisationProfileURL}">${organisation.name}</a>
					</div> <!-- .organisationName -->

					<div class="organisationSummary">
						${organisation.summary}
					</div><!-- .organisationSummary -->

					<div class="organisationMoreInfo">

						<table class="organisationMoreInfoTable">
							<colgroup>
								<col class="col1">
								<col class="col2">
							</colgroup>
							<tr class="row1">
								<td>
									<span class="title">Location:</span>
									<span class="value">
										<a href="#">${organisation.location.suburb}</a>, 
										<a href="#">${organisation.location.state}</a>, 
										<a href="#">${organisation.location.country}</a>
									</span>
								</td>
								<td>
									<span class="title">Service Categories:</span>
									<span class="value">
										<c:forEach items="${organisation.serviceCategories}" var="serviceCategory">
											<a href="#">${serviceCategory.name}</a>
										</c:forEach>
									</span>
								</td>
							</tr>

							<tr class="row2">
								<td>
									<span class="title">#Users:</span>
									<span class="value">${organisation.userNetworkSize}</span>
								</td>
								<td>
									<span class="title">#Projects:</span>
									<span class="value">${organisation.projectNetworkSize}</span>
								</td>
							</tr>

						</table> <!-- .organisationMoreInfoTable -->
					</div> <!-- .organisationMoreInfo -->
				</div> <!-- .organisationExtendedInfo -->

				<div class="organisationDealClincher">
					<span class="viewOrganisationProfile">
						<a href="${organisationProfileURL}">&raquo; View ${organisation.name}'s profile</a>
					</span>
					<span class="joinOrganisation">
						<a href="#">&raquo; Support ${organisation.name}</a>
					</span>
				</div><!-- .organisationDealClincher -->

			</div> <!-- .organisationDetails -->
			<!-- END FIRST ORGANISATION -->
			
		</c:forEach>
	</c:if>

</div> <!-- #contentHolder -->
<!-- END CONTENT HOLDER -->

